package org.alex.samples.service;

import java.util.List;

import org.alex.samples.dao.IExamScoreDAO;
import org.alex.samples.model.ExamScore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ExamScoreServiceImpl implements IExamScoreService{

	@Autowired
	IExamScoreDAO examScoreDAO;
	
	@Override
	public ExamScore getScoreByUIdSId(Integer userid, Integer subjectid) {
		return examScoreDAO.getScoreByUIdSId(userid, subjectid);
	}

	@Override
	public void saveScoreByUIdSId(Integer userid, Integer subjectid , Integer score) {
		examScoreDAO.saveScoreByUIdSId(userid,subjectid,score);
	}

	@Override
	public List<ExamScore> getAllScore() {
		return examScoreDAO.getAllScore();
	}

	@Override
	public List<ExamScore> searchScore(Integer subjectId, Integer studentId, String studentName, String testDate) {
		return examScoreDAO.searchScore(subjectId,studentId,studentName,testDate);
	}

	@Override
	public ExamScore getScoreById(Integer id) {
		return examScoreDAO.getScoreById(id);
	}

	@Override
	public void updateScore(ExamScore s) {
		examScoreDAO.updateScore(s);
	}

	@Override
	public void deleteScore(ExamScore s) {
		examScoreDAO.deleteScore(s);
	}
	
	
}
